< previous page page_310 next page >

Page 310
Type.gifListing 9.1. continued
        Case vbDate
            strReturn = "Date"
        Case vbString
            strReturn = "String"
        Case vbObject
            strReturn = "Object"
        Case vbError
            strReturn = "Error"
        Case vbBoolean
            strReturn = "Boolean"
        Case vbVariant
            strReturn = "Variant"
        Case vbDataObject
            strReturn = "dao"
        Case vbDecimal
            strReturn = "Decimal"
        Case vbByte
            strReturn = "Byte"
        Case vbArray
            strReturn = "Array"
        Case Else
            strReturn = "[" & CStr(varTypeCode) & "]"
    End Select
    '
    ShowType = strReturn
    '
End Function
Now you're ready to start DAO programming!
First, add a single button to the bottom of the current form. Set its Name property to cmdDBEngine and its Caption property to DBEngine. Now double-click the button to bring up the cmdDBEngine_Click event window and enter the code shown in Listing 9.2.
Type.gifListing 9.2. Coding the cmdDBEngine_Click event.
Private Sub cmdDBEngine_Click()
    '
    ' show engine properties
    '
    On Error GoTo LocalErr
    '
    Dim objItem As Object
    Dim strMsg As String
    '
    strMsg = ""
    For Each objItem In DBEngine.Properties
        strMsg = strMsg & objItem.Name
        strMsg = strMsg & " = "
        strMsg = strMsg & objItem.Value
        strMsg = strMsg & " {"

 
< previous page page_310 next page >

If you like this book, buy it!